package com.ylsk.system.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ylsk.common.annotation.Excel;
import com.ylsk.common.core.domain.BaseEntity;

/**
 * 消息对象 sys_msg
 *
 * @author ruoyi
 * @date 2024-01-09
 */
@TableName("sys_msg")
public class SysMsg extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息id */
    @TableId
    private Long messageId;

    /** 发送人 */
    @Excel(name = "发送人")
    private Long fromUser;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date fromTime;

    /** 接收人 */
    @Excel(name = "接收人")
    private Long toUser;

    /** 接收时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date toTime;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    private String message;

    /** 是否已读  0 未读 1 已读*/
    @Excel(name = "是否已读")
    private Integer isRead;

    /** 访问地址 */
    @Excel(name = "访问地址")
    private String requestUlr;

    /** 消息类型 */
    @Excel(name = "消息类型")
    private Long messageType;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 发送人名称 */
    private String fromUserName;

    public void setMessageId(Long messageId)
    {
        this.messageId = messageId;
    }

    public Long getMessageId()
    {
        return messageId;
    }
    public void setFromUser(Long fromUser)
    {
        this.fromUser = fromUser;
    }

    public Long getFromUser()
    {
        return fromUser;
    }
    public void setFromTime(Date fromTime)
    {
        this.fromTime = fromTime;
    }

    public Date getFromTime()
    {
        return fromTime;
    }
    public void setToUser(Long toUser)
    {
        this.toUser = toUser;
    }

    public Long getToUser()
    {
        return toUser;
    }
    public void setToTime(Date toTime)
    {
        this.toTime = toTime;
    }

    public Date getToTime()
    {
        return toTime;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setMessage(String message)
    {
        this.message = message;
    }

    public String getMessage()
    {
        return message;
    }
    public void setIsRead(Integer isRead)
    {
        this.isRead = isRead;
    }

    public Integer getIsRead()
    {
        return isRead;
    }
    public void setRequestUlr(String requestUlr)
    {
        this.requestUlr = requestUlr;
    }

    public String getRequestUlr()
    {
        return requestUlr;
    }
    public void setMessageType(Long messageType)
    {
        this.messageType = messageType;
    }

    public Long getMessageType()
    {
        return messageType;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }


    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("messageId", getMessageId())
            .append("fromUser", getFromUser())
            .append("fromTime", getFromTime())
            .append("toUser", getToUser())
            .append("toTime", getToTime())
            .append("title", getTitle())
            .append("message", getMessage())
            .append("isRead", getIsRead())
            .append("requestUlr", getRequestUlr())
            .append("messageType", getMessageType())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
